﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace StudentManagement
{
    class BoolToString : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if ((bool)value)
                return "Male";
            return "Female";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value.ToString().ToLower() == "male";
        }
    }
}
